<template>
    <div>
        <h3 class="title">Stock In List</h3>
        <el-table
                :data="partStockInList"
                border
                row-key="id"
                stripe
        >
            <el-table-column prop="stockInDate" label="Stock In Date"/>
            <el-table-column prop="stockInNum" label="StockIn No"/>
            <el-table-column prop="stockInDesc" label="Reason"/>
            <el-table-column prop="warehouseDesc" label="warehouse"/>
            <el-table-column label="Parts Number">
                <template slot-scope="part">
                    {{part.row.spareParts.partsNumber}}
                </template>
            </el-table-column>
            <el-table-column prop="partsQuantity" label="quantity"/>
        </el-table>
        <h3 class="title">Stock Out Detail</h3>
        <el-table
            :data="partStockOutList"
            border
            row-key="id"
        >
            <el-table-column prop="stockOutDate" label="Stock out Date"/>
            <el-table-column prop="stockOutNum" label="Stock out Num"/>
            <el-table-column prop="receiver" label="Receiver"/>
            <el-table-column prop="warehouseDesc" label="warehouse"/>
            <el-table-column prop="workOrderNo" label="Working/Consignment No">
                <template slot-scope="part">
                    <span v-if="part.row.workOrderNo">{{part.row.workOrderNo}}</span>
                    <span v-if="part.row.salesOrderNum">{{part.row.salesOrderNum}}</span>
                </template>
            </el-table-column>
            <el-table-column label="Parts Number">
                <template slot-scope="part">
                    {{part.row.spareParts.partsNumber}}
                </template>
            </el-table-column>
            <el-table-column prop="partsQuantity" label="quantity"/>
        </el-table>
    </div>

</template>

<script>
    export default {
        name: "part-stock-detail",
        props:{
            partStockInList:Array,
            partStockOutList:Array
        }
    }
</script>

<style scoped>

</style>